﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using WSManager.Model;

namespace WSManager.Logic.Transformation.Articles
{
    abstract public class ArticleTransformer
    {

        public virtual XElement ConvertFile(string name)
        {
            return ConvertStream(File.OpenRead(name));
        }

        public virtual XElement ConvertFile(FileInfo file)
        {
            return ConvertStream(file.OpenRead());
        }

        public abstract XElement ConvertStream(Stream stream);
    }
}
